// 装货员端接口
import request from "@/service/request";

// 获取订单
export function getOrder(data) {
    return request({
        url: `/menu/get/orders/all`,
        method: "POST",
        data
    });
}

// 截单
export function postOrder() {
    return request({
        url: `/menu/end/update/orders`,
        method: "POST"
    });
}

// 打印总单
export function printTest(data) {
    return request({
        url: `/menu/seal/orders/main`,
        method: 'POST',
        type: 'download',
        data
    })
}

// 获取打印总单时间
export function getOrderTime() {
    return request({
        url: `/menu/get/end/orders`,
        method: 'GET',
    })
}

// 打印所有订单
export function printOrderGo(params) {
    return request({
        url: `/menu/seal/excel/orders`,
        type: 'download',
        method: 'GET',
        params
    })
}

// 打印单个订单
export function printOrderDetail(params) {
    return request({
        url: `/menu/seal/pdf/orders`,
        method: 'GET',
        params
    })
}

// 添加物流
export function addGo(data) {
    return request({
        url: `/menu/input/logistics`,
        method: 'POST',
        data
    })
}

// 查看物流
export function getGo(params) {
    return request({
        url: `/menu/get/logistics`,
        method: 'GET',
        params
    })
}

// 查看详细物流
export function getDetailGo(params) {
    return request({
        url: `/menu/get/orLogistics`,
        method: 'GET',
        params
    })
}

// 修改物流
export function changeGo(data) {
    return request({
        url: `/menu/up/logistics`,
        method: 'POST',
        data
    })
}

// 删除物流
export function deleteGo(params) {
    return request({
        url: `/menu/delete/excel`,
        method: 'GET',
        params
    })
}

// 取消订单
export function delOrder(params) {
    return request({
        url: `/menu/postpone/orders`,
        method: 'GET',
        params
    })
}

